/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.edu.ifrn.Classes;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Edmilson
 */
public class Conexao {
    
    public Connection getConnection(){
        try{
        Class.forName("com.mysql.jdbc.Driver");
        }
        catch(ClassNotFoundException e){
            e.printStackTrace();
        }
        try{
            return DriverManager.getConnection("jdbc:mysql://localhost:3306/sgr","root","");
        }
        catch(SQLException e){
            throw new RuntimeException(e);
        }
    }
}
